1. Field of the Invention
The present invention relates to a microcomputer having a self-diagnostic unit, and more specifically to a microcomputer with a self-diagnostic function of diagnosing the CPU in the microcomputer by the CPU monitor macro service which is a program for executing a series of instructions necessary for diagnosing the CPU by the external interrupt signal.
2. Description of the Related Art
Recently, to enhance the performance of the motor vehicle and increase the safety thereof, there has been commonly used an electronic controller provided with a microcomputer, in the main controller of the motor vehicle such as the engine controller and the brake controller. If a failure arises in the user set which involves the engine controller and the brake controller or in the microcomputer, it may endanger human life. Accordingly, the microcomputer for use in such a technical field requires a high reliability. To check whether or not a failure occurs in the microcomputer prior to shipping the user set, the engineer of the controller for the motor vehicle applies the self-diagnostic software to the microcomputer from the external, after installing it in the user board. Thus, the self-diagnostic software diagnoses the CPU in the microcomputer to confirm whether a failure occurs or not based upon the diagnostic result.
As described above, concerning the conventional microcomputer used in the motor vehicle, the self-diagnostic software diagnosing the CPU is applied to the microcomputer after installation of it in the user board to confirm the status of the microcomputer, previous to the shipment of the user set. In this case, the self-diagnostic of the CPU is implemented pursuant to the instructions of the CPU self-diagnostic software read in from the external. Therefore, the time for reading in the instructions of the CPU self-check software is necessary.
On the other hand, there has been published a macro service which executes a series of instructions by the interrupt, in the Japanese Patent Publication Laid-Open No. 60-183639 "data processing apparatus." In the conventional macro service, the central processing unit includes data processing control means, which performs the arithmetic operation and the forwarding on the data stored in the storage with the whole status unchanged, upon halting the first process relevant to executing the program in the program memory. In response to the request for processing from the counter, the data processing means carries out the arithmetic operation and the forwarding. Consequently, the conventional data processing apparatus reduces the time for the interrupt processing, thus returning to the first process quickly.
The purpose of the above conventional macro service, however, is only to decrease the time necessary to execute the external program as an interrupt processing, but not to reduce the time for diagnosing the CPU. As regards the CPU diagnostic, the above publication teaches neither any function nor any structure.